package com.niiwoo.civet.mobile.vo.response.credit;

import com.alibaba.dubbo.common.utils.Assert;
import com.niiwoo.civet.trade.dto.response.credit.InvestigationStatisticsDTO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
@ApiModel("尽调统计信息")
public class InvestigationStatisticsResponseVO {

    @ApiModelProperty("累计尽调收益")
    private String accruedIncomeAmount;
    
    @ApiModelProperty("近3个月尽调收入")
    private String latest3MonthIncomeAmount;
	
    @ApiModelProperty("累计尽调笔数")
    private String investigationTotalNumber;
    
    /**
     * DTO转换VO
     * 
     * @param dto
     */
	public static InvestigationStatisticsResponseVO convertDTO2VO(InvestigationStatisticsDTO dto) {
		
		Assert.notNull(dto, new IllegalArgumentException("请求转化的DTO对象为空"));
		
		InvestigationStatisticsResponseVO vo = new InvestigationStatisticsResponseVO();
		vo.setAccruedIncomeAmount(dto.getAccruedIncomeAmount().toString());
		vo.setLatest3MonthIncomeAmount(dto.getLatest3MonthIncomeAmount().toString());
		vo.setInvestigationTotalNumber(dto.getInvestigationTotalNumber().toString());
		return vo;
	}
}